Conversation
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com>
|
@copilot The GitHub workflow for integration tests fails with Run pytest tests/integration_tests/ -v |
Co-authored-by: gensyn <36128035+gensyn@users.noreply.github.com> Agent-Logs-Url: https://github.com/gensyn/ssh_command/sessions/7df20bb9-332d-4caf-922a-0f232e2d1fde
... The CI was failing because the integration-tests workflow only installed Fixed in b472b92 by adding |
Adds real Home Assistant integration tests (using
pytest-homeassistant-custom-component) mirroring the pattern from task_tracker PR #21, and relocates unit tests fromtest/totests/unit_tests/.Test structure
tests/unit_tests/— existing unit tests (moved fromtest/; path depth updated fromparent×3→parent×4)tests/integration_tests/conftest.py— createscustom_components/ssh_command → <repo_root>symlink at test collection time so HA's loader discovers the component; providesauto_enable_custom_integrationsfixturetests/integration_tests/test_integration.py— 29 tests against a live in-processHomeAssistantinstance, with onlyasyncsshpatched outIntegration test coverage
TestSetupEntryhass.data, service registered, single-instance guardTestUnloadEntryTestConfigFlowTestExecuteServiceSuccessTestExecuteServiceKnownHostscheck_known_hosts=False→None, custom/missing file, default~/.ssh/known_hostsTestExecuteServiceValidation_validate_service_dataerror paths, including no coordinator presentTestExecuteServiceErrorsHostKeyNotVerifiable,PermissionDenied,TimeoutError,gaierror, genericOSError)Infra changes
requirements_integration_tests.txt—pytest-homeassistant-custom-component==0.13.318pytest.ini—asyncio_mode = auto.github/workflows/integration-tests.yml— new CI job runningpytest tests/integration_tests/ -vtest.ymlupdated todiscover -s tests/unit_testspylint.ymlignore-paths updated to^tests/.*$run_tests.shupdated totests/unit_tests.gitignoreexcludescustom_components/(created at runtime byconftest.py)📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.